package com.xmmj.baselibrary.utils.websocket

import android.text.TextUtils
import android.util.Log

/**
 * 日志输出工具
 */
object WSLog {
    const val LOG_TAG = "WebSocket"

    fun log(log: String?) {
        log(null, log)
    }

    fun log(tag: String?, log: String?) {
        var tag = tag
        if (TextUtils.isEmpty(log)) {
            return
        }
        if (TextUtils.isEmpty(tag)) {
            tag = LOG_TAG
        }
        Log.d(tag, log!!)
    }
}